package com.appwoo.txtws.component;

import java.util.Observable;

public class ZoomState extends Observable
{
  private float mPanX;
  private float mPanY;
  private float mZoom;

  public float getPanX()
  {
    if (this.mPanX > 1.0F)
      this.mPanX = 1.0F;
    if (this.mPanX < 0.0F)
      this.mPanX = 0.0F;
    return this.mPanX;
  }

  public float getPanY()
  {
    if (this.mPanY > 1.0F)
      this.mPanY = 1.0F;
    if (this.mPanY < 0.0F)
      this.mPanY = 0.0F;
    return this.mPanY;
  }

  public float getZoom()
  {
    return this.mZoom;
  }

  public float getZoomX(float paramFloat)
  {
    return Math.min(this.mZoom, paramFloat * this.mZoom);
  }

  public float getZoomY(float paramFloat)
  {
    return Math.min(this.mZoom, this.mZoom / paramFloat);
  }

  public void setPanX(float paramFloat)
  {
    if (paramFloat != this.mPanX)
    {
      this.mPanX = paramFloat;
      setChanged();
    }
  }

  public void setPanY(float paramFloat)
  {
    if (paramFloat != this.mPanY)
    {
      this.mPanY = paramFloat;
      setChanged();
    }
  }

  public void setZoom(float paramFloat)
  {
    if (paramFloat != this.mZoom)
    {
      if ((paramFloat < 1.0F) || (paramFloat > 3.0F))
        break label32;
      this.mZoom = paramFloat;
    }
    while (true)
    {
      setChanged();
      return;
      label32: if (paramFloat < 1.0F)
        this.mZoom = 1.0F;
      else if (paramFloat > 3.0F)
        this.mZoom = 3.0F;
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.component.ZoomState
 * JD-Core Version:    0.6.2
 */